//
//  UIImage+Image.m
//  TestRunTime
//
//  Created by 吴志勇 on 2020/3/23.
//  Copyright © 2020 wzy. All rights reserved.
//

#import "UIImage+Image.h"
#import <objc/message.h>

#import <AppKit/AppKit.h>


@implementation UIImage (Image)


+ (void)load{
    Method imageMethod = class_getClassMethod(self, @selector(imageNamed:));
    
    
    Method wzy_imageMethod = class_getClassMethod(self, @selector(wzy_imageNamed:));
    
    method_exchangeImplementations(imageMethod, wzy_imageMethod);
    
}


+ (UIImage *)wzy_imageNamed:(NSString *)name{
    UIImage *image = [UIImage wzy_imageNamed:name];
    if (image) {
        NSLog(@"成功");
    }else{
        NSLog(@"失败");
    }
    
    return image;
}

@end
